{% extends 'generic/object.html' %}
{% load helpers %}
{% load static %}

{% block breadcrumbs %}
  {{ block.super }}
  <li class="breadcrumb-item"><a href="{% url object.assigned_object|viewname:'journal' pk=object.assigned_object.pk %}">{{ object.assigned_object }}</a></li>
{% endblock %}

{% block content %}
    <div class="row mb-3">
        <div class="col col-md-4">
            <div class="card">
                <h5 class="card-header">
                    Journal Entry
                </h5>
                <div class="card-body">
                    <table class="table table-hover attr-table">
                        <tr>
                            <th scope="row">Object</th>
                            <td>
                                <a href="{{ object.assigned_object.get_absolute_url }}">{{ object.assigned_object }}</a>
                            </td>
                        </tr>
                        <tr>
                            <th scope="row">Created</th>
                            <td>
                                {{ object.created|annotated_date }}
                            </td>
                        </tr>
                        <tr>
                            <th scope="row">Created By</th>
                            <td>
                                {{ object.created_by }}
                            </td>
                        </tr>
                        <tr>
                            <th scope="row">Kind</th>
                            <td>
                                <span class="badge bg-{{ object.get_kind_class }}">{{ object.get_kind_display }}</span>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
        <div class="col col-md-8">
            {% include 'inc/panels/comments.html' %}
        </div>
    </div>
{% endblock %}
